Achieve 80% to pass. Wherever necessary, you are free to check the documentation of the Python packages when answering the questions.
- Which of the following statements is true about cartopy?
- Cartopy is a data visualization tool for creating interactive plots
- Cartopy is a library for geospatial data processing and analysis
- Cartopy is a library for mathematical operations
- Cartopy does not have dependency on shapely
- Suppose I have a matplotlib Axes object as ax and I want to add gridlines to the Axes object with the following styles:
– dotted lines in red color
– label longitude and latitude on the x and y axis respectively
– make the gridline semi-transparent
Which of the following arguments should I specify in the ax.gridlines() function to create such a style?
- linecolor, linestyle, draw_labels, transparency
- color, linestyle, labels, alpha
- color, linestyle, draw_labels, alpha
- linecolor, linestyle, labels, transparency
- Consider the following code.
fig = plt.figure()
ax = fig.add_subplot(projection=[1])
ax.contour(x, y, z, transform=[2])
x, y, z are 2D arrays of x-coordinates, y-coordinates, and height values respectively. If the data has a projection of plate carrée, and I want to plot the data in the orthographic projection, what should I specify in [1] and [2]?- [1]: ccrs.PlateCarree() [2]: ccrs.Orthographic()
- [1]: ccrs.Orthographic() [2]: ccrs.PlateCarree()
- [1]: ccrs.Orthographic() [2]: ccrs.Orthographic()
- [1]: ccrs.PlateCarree() [2]: ccrs.PlateCarree()
- Which of the following is(are) NOT built-in features in the cartopy.feature library?
- Glaciated area
- Lakes
- Vegetation covers
- United States borders
- Which of the following arguments do I specify to draw a geodetic line on the map using the plt.plot() function? matplotlib.pyplot is imported as plt.
- projection=ccrs.Geodetic()
- property=ccrs.Geodetic()
- linestyle=ccrs.Geodetic()
- transform=ccrs.Geodetic()
- Which of the following statements is(are) true regarding the use of shapefile with matplotlib and cartopy?
- Reading shapefile involves the shapely library
- Shapefile data can be plotted directly using the plot() function of matplotlib
- Only the .shp data is needed to read the shapefile
- We cannot customize the features of the shapefile using any matplotlib functions
- Which of the following statements is(are) true regarding np.ma.masked_where()?
- This is a numpy function for creating a masked array based on a specified condition
- This function requires at least 2 inputs, which include a masking condition and an array to mask, and these 2 inputs can have different dimensions and sizes
- This function creates a boolean array according to the specified condition
- The output of this function contains only the masked data
Answer: b) the 2 inputs must have the same dimension and size. d) The output is a MaskedArray object containing the masked data, a boolean array of the mask, and the fill value
- What is the purpose of the sigma parameter in the scipy.ndimage.gaussian_filter() function?
- To create a gaussian filter
- To control the thickness of the contour lines
- To control the degree of smoothing applied to the contour lines
- To determine how the input array is extended when the filter overlaps a border
- What is(are) the situations where contour smoothing may be applied?
- To increase the accuracy of the data
- To increase the amount of data being displayed
- To visualize data that contains a lot of noises
- To make a blurred image
- What is the output of the following command?
import metpy.units as units
(4*units.kilometer + 500*units.meter)/(2*units.minute + 40*units.second)
- 12.0 meter/second
- 28.125 meter/second
- 1.6875 kilometer/minute
- 12.0 kilometer/minute
- What are the required inputs for the mpcalc.wind_components() function? metpy.calc is imported as mpcalc.
- Wind speed and wind direction
- Zonal wind speed and meridional wind speed
- Pressure and temperature
- All of the above are valid input
- What is the purpose of applying vertical exaggeration when plotting the vertical wind profile of the atmosphere?
- To highlight the small changes in vertical wind speed and direction over altitudes
- To adjust the positions of wind barbs due to the non-linear relationship between altitude and pressure of the atmosphere
- To increase the resolution of vertical wind component and make the plot accurate
- None of the above
- What does it mean by normal and tangential components of wind along a cross section?
- Normal component is the component of wind velocity that is pointing towards the vertical direction, while tangential component is the component of wind velocity that is pointing towards the horizontal direction
- Normal component is the component of wind velocity that is pointing towards the horizontal direction, while tangential component is the component of wind velocity that is pointing towards the vertical direction
- Normal component is the component of wind velocity that is perpendicular to the cross section, while tangential component is the component of wind velocity that is parallel to the cross section
- Normal component is the component of wind velocity that is parallel to the cross section, while tangential component is the component of wind velocity that is perpendicular to the cross section
- What is the purpose of the start_point and end_point parameters in metpy.interpolate.cross_section?
- To define the starting and ending coordinates of the cross-section line
- To define the altitude range of the cross-section line
- To define the length of the cross-section line
- None of the above is correct
- In the fig.add_axes() function, a sequence of floats [p,q,r,s] is required as the input. What do p,q,r,s mean respectively?
- Position of the left axis, position of the right axis, position of the bottom axis, position of the upper axis
- Position of the left axis, position of the right axis, position of the bottom axis, position of the upper axis
- Position of the bottom axis, position of the left axis, height of the axes, width of the axes
- Position of the left axis, position of the bottom axis, width of the axes, height of the axes
Previous | Next week |
---|